This invention relates to a distance measuring apparatus and method, and in particular to an apparatus for and a method of optically measuring distances to objects present in multiple directions.
Measurement of the distance from the measuring apparatus to an object which is an object to be measured is utilized for various purposes.
For example, in a self-running robot, the distance measurement as described above is sometimes effected for the recognition of the ambient environment. On the basis of the information thus obtained, the robot can run while avoiding a collision with the object.
Further, as an apparatus utilizing the distance measurement as described above, there is an automobile collision preventing apparatus. In this apparatus, on the basis of the information obtained by the distance measurement, a warning is given to the driver or the directions for stopping or decelerating the automobile are given to the driver when the automobile has come close to another automobile or an object, such as a wall, beyond a predetermined distance.
For the distance measurement as described above, use is sometimes made of the method of emitting an ultrasonic wave to an object to be measured and analyzing the ultrasonic wave reflected by the object to be measured. However, the method using an ultrasonic wave encounters a problem that where the object to be measured is small, measurement becomes difficult and further, the resolving power of measurement is low.
On the other hand, there would occur to mind to optically effect the distance measurement as described above, and a method therefor is a stereo method. The outline of the stereo method will hereinafter be described.
FIGS. 1A and 1B illustrate the principle of the stereo method. In FIGS. 1A and 1B, reference numerals 101 and 102 designate lenses of equal focal lengths, and reference characters 101A and 102A denote the optic axes thereof. The lenses 101 and 102 are disposed so that the optic axes 101A and 102A thereof are parallel to each other and a line (base line) passing through the centers of the lenses is orthogonal to the optic axes 101A and 102A. Rearwardly of the lens 101, measuring means 103 is disposed at a position spaced apart by the focal length f of the lens 101, and rearwardly of the lens 102, measuring means 104 is disposed at a position spaced apart by the focal length f of the lens 102. These measuring means 103 and 104 are disposed on a straight line in a direction parallel to the direction of the base line.
In FIG. 1A, an object 105 which is an object to be measured is present at infinity along the optic axes 101A and 102A. In this case, the image 106 of the object 105 on the measuring means 3 by the lens 101 is present on the optic axis 101A, and likewise, the image 107 of the object 105 on the measuring means 104 by the lens 102 is present on the optic axis 102A.
In FIG. 1B, the object 105 is present at a position spaced apart by a finite distance Q on the optic axis 101A. In this case, the image 106 of the object 105 on the measuring means 103 by the lens 101 is present on the optic axis 101A, but the image 107 of the object 105 on the measuring means 104 by the lens 102 is present at a position spaced apart from the optic axis 102A.
Accordingly, by detecting the amount of deviation d of the image 107 from the optic axis 102A (corresponding to the position of the image 106 on the measuring means) by measuring means, the distance Q to be measured can be found by the following equation from the focal length f and the base length l between the lens 101, 102 and the measuring means 103,104: ##EQU1## This equation is established not only when the object is present on the optic axis, but also generally.
In this case, d is the difference between the amounts of deviation of two images on the measuring means 103 and 104 from the respective optic axes.
Meanwhile, an object to be measured generally has a certain extension and therefore, such an image that has the extension is formed on the measuring means. Accordingly, it is difficult to identify the image of a certain point on an object.
In the stereo method as described above, the correlation between the illumination distribution on one measuring means 103 and the illumination distribution on the other measuring means 104 is taken to find said d from the information about the positions of the images 106 and 107 by the measuring means 103 and 104.
FIGS. 2A-2F illustrate the principle of such a correlation method.
As the measuring means 103 and 104, use is made, for example, of CCD arrays which are self-scanning type sensors. As is well known, the CCD array is comprised of a number of light-receiving elements of minute segments each having a width of the order of 10.mu., and can put out electrical signals corresponding to the illuminations of the image detected by the light-receiving elements as time-serial signals in accordance with a predetermined order.
In FIG. 2A, the CCD array 103 which is the measuring means corresponding to the lens 101 has n number of light-receiving elements, and in FIG. 2B, the CCD array 104 which is the measuring means corresponding to the lens 102 has m number of light-receiving elements (m&gt;n). That is, if the distance to the object on the optic axis 101A is to be measured, the image 106 by the lens 101 is present on the optic axis 101A independently of the distance to the object, but the image 107 by the lens 102 changes its position in conformity with the distance to the object and therefore, a greater number of light-receiving elements are provided on the CCD array 104 than on the CCD array 103. In such an arrangement, the CCD array 103 is called a standard view field and the CCD array 104 is called a reference view field.
The illumination distributions in the standard view field and the reference view field in the arrangement as shown in FIGS. 2A and 2B are such as shown in FIGS. 2C and 2D. That is, the imaging relation in the direction of the optic axis between the object 105 and the image 106 with respect to the lens 101 is equal to the imaging relation in the direction of the optic axis between the object 105 and the image 107 with respect to the lens 102 (that is, the magnifications are equal) and therefore, the illumination distribution of the image 106 and the illumination distribution of the image 107 differ from each other only in that the image 107 deviates from the optic axis by the distance d.
Accordingly, from the CCD arrays 103 and 104, there are time-serially obtained the outputs corresponding to the light-receiving elements as shown in FIGS. 2E and 2F.
So, in order to take the correlation between the outputs of the two CCD arrays, the sum ##EQU2## of the differences between the corresponding outputs of the outputs S.sub.1 .about.S.sub.1 of the first to nth light-receiving elements in the standard view field and the outputs R.sub.1 .about.R.sub.n of the first to nth light-receiving elements in the reference view field is first found. Subsequently, in the same manner, the sum ##EQU3## of the differences between the corresponding outputs of the outputs S.sub.1 .about.S.sub.n of the first to nth light-receiving elements in the standard view field and the outputs R.sub.2 .about.R.sub.n+1 of the second to (n+1)th light-receiving elements in the reference view field is found. Thereafter, in the same manner, up to ##EQU4## is found.
The number of COR which is the smallest value (ideally 0) of the thus found (m-n+1) values is chosen, and that number is multiplied by the width of the light-receiving element of the CCD array, whereby the value of said d can be found.
Where the distance measurement using the correlation method as described above is utilized in the distance measurement not only in a single direction but also in multiple directions having two-dimensionally a certain expanse, effecting the distance measurement as described above in each direction while mechanically rotating the entire measuring apparatus can be exemplarily shown as a method.
However, this method would suffer from a problem that it requires a mechanical driving mechanism and the driving thereof takes much time and measurement cannot be accomplished within a short time. Further, in this method, it would necessary to record both of the signal from the measuring means and the direction signal from the mechanical driving means during the recording of a two-dimensional distance pattern, and thus, signal processing would become complicated.
It is an object of the present invention to solve the above-noted problems and to provide an apparatus for and a method of measuring distances to objects present in multiple directions which are simple in signal processing and good in accuracy.
According to the present invention, to solve the above-noted problems peculiar to the prior art or the example of the conception, there are provided a distance measuring apparatus and method characterized in that two-dimensionally arranged light-receiving elements are used as illumination distribution measuring means, the correlation between the illumination distributions of the images of an object formed by the lenses in the set of certain portions of the respective measuring means is taken to thereby calculate the distance to an object present in a certain direction corresponding to said set, and said calculations are effected with respect to a plurality of set portions of the respective measuring means to thereby calculate the distances to objects present in a plurality of directions.